package com.ysd.lis.controller.qi;


import com.ysd.common.Result;
import com.ysd.lis.controller.pub.BaseController;
import com.ysd.lis.entity.qi.QiJobVsMainitem;
import com.ysd.lis.request.qi.QiItemDto;
import com.ysd.lis.service.qi.QiJobVsMainitemService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 * 任务与指标项目对照表 前端控制器
 * </p>
 *
 * @author WH
 * @since 2024-07-12
 */
@RestController
@RequestMapping("/api/qi/qiJobVsMainitem")
public class QiJobVsMainitemController extends BaseController {

    @Autowired
    private QiJobVsMainitemService qiJobVsMainitemService;

    @ApiOperation("查询")
    @GetMapping("/findQiJobVsMainitemList")
    public Result findQiJobVsMainitemList(QiJobVsMainitem qiJobVsMainitem) {

        return qiJobVsMainitemService.findQiJobVsMainitemList(qiJobVsMainitem);
    }

    @ApiOperation("查询")
    @GetMapping("/findQiItemList")
    public Result findQiItemList(QiItemDto qiItemDto) {

        return qiJobVsMainitemService.findQiItemList(qiItemDto);
    }


    @ApiOperation("添加对照关系")
    @PostMapping("/addQiJobVsMainitem")
    public Result addQiJobVsMainitem(@RequestBody QiJobVsMainitem qiJobVsMainitem) {
        return qiJobVsMainitemService.addQiJobVsMainitem(qiJobVsMainitem);
    }

    @ApiOperation("删除对照关系")
    @PostMapping("/deleteQiJobVsMainitem")
    public Result deleteQiJobVsMainitem(@RequestBody QiJobVsMainitem qiJobVsMainitems) {
        return qiJobVsMainitemService.deleteQiJobVsMainitem(qiJobVsMainitems);
    }
}
